﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="listsanpham.ascx.cs"
    Inherits="Shop_Phone.UserControls.listsanpham" %>
<div>
    <div class="span9">
        <div id="wproduct-list" class="box-brand">
            <div class="header2">
                <span class="title2"><span><a href="">Sản phẩm khuyến mại</a> <a href="" style="float: right;
                    color: #004370; font: normal 11px arial; text-transform: none; margin: 4px -4px;"
                    title="Xem thêm Sản phẩm khuyến mại">Xem thêm &gt;</a> </span></span>
            </div>
            <div class="w-product-list clearfix content-product" style="border: 1px solid #e1e1e2;
                border-top: none;">
                <ul class="product-list">
                    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
                        <ItemTemplate>
                            <li id="main_<%# Eval("masanpham")%>" class="itm">
                                <div>
                                    <div id="productImageWrapID_<%# Eval("masanpham")%>">
                                        <div class="div-image-product">
                                            <a href='Detail.aspx?ID=<%# Eval("masanpham")%>' title="">
                                                <img class="image-product" id="img_<%# Eval("masanpham")%>" src="<%# Eval("hinhanh")%>"
                                                    alt="" title="<%# Eval("tensanpham")%>">
                                                <img class="product-img2" src="Images/khuyenmai.gif" alt="" style="border: none;">
                                            </a>
                                        </div>
                                        <div class="div-detail-product">
                                            <h3>
                                                <a style="text-transform: uppercase;" href='Detail.aspx?ID=<%# Eval("masanpham")%>'>
                                                    <%# Eval("tensanpham")%></a></h3>
                                            <p>
                                                Giá: <span>
                                                    <%# Eval("giasanpham")%>
                                                    đ </span>
                                            </p>
                                            <p>
                                                Giá ĐL: <span style="font-weight: normal"><a href="">Đăng nhập</a></span></p>
                                            <p>
                                                KM: <span style="color: #b6260a">
                                                    <%# Eval("khuyenmai")%></span></p>
                                            <p>
                                                Tình trạng:
                                                <%# tinhtranghang(Eval("soluong"))%>
                                            </p>
                                            <p>
                                                <input class="pquantityx" id="quantity_GALAXYS5B" type="text" size="1" value="<%# Eval("soluong")%>">
                                                <a href='Default.aspx?action=add&amp;id=<%# Eval("masanpham")%>&amp;name=<%# Eval("tensanpham")%>&amp;price=<%# Eval("giasanpham")%>'
                                                    class="bt-dathang add2cart" style="vertical-align: middle;" data-id="<%# Eval("masanpham")%>">
                                                    Chọn mua</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:shop_phone %>"
                        SelectCommand="SELECT top 9 sanpham.[masanpham], [tensanpham], [giasanpham], [phukiendikem], [hinhanh], [soluong] , khuyenmai.khuyenmai FROM [sanpham] inner join khuyenmai on sanpham.masanpham = khuyenmai.masanpham where (khuyenmai.trangthai = @trangthai)  ORDER BY [ngaydang]">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="true" Name="trangthai" Type="Boolean" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </ul>
            </div>
        </div>
    </div>
</div>
<div>
    <div class="span9">
        <div id="wproduct-list" class="box-brand">
            <div class="header2">
                <span class="title2"><span><a href="">Sản phẩm nổi bật</a> <a href="" style="float: right;
                    color: #004370; font: normal 11px arial; text-transform: none; margin: 4px -4px;"
                    title="Xem thêm Sản phẩm nổi bật">Xem thêm &gt;</a> </span></span>
            </div>
            <div class="w-product-list clearfix content-product" style="border: 1px solid #e1e1e2;
                border-top: none;">
                <ul class="product-list">
                    <asp:Repeater ID="Rptranphamnoibat" runat="server" DataSourceID="SqlDataSource1">
                        <ItemTemplate>
                            <li id="main_<%# Eval("masanpham")%>" class="itm">
                                <div>
                                    <div id="productImageWrapID_<%# Eval("masanpham")%>">
                                        <div class="div-image-product">
                                            <a href='Detail.aspx?ID=<%# Eval("masanpham")%>' title="">
                                                <img class="image-product" id="img_<%# Eval("masanpham")%>" src="<%# Eval("hinhanh")%>"
                                                    alt="" title="<%# Eval("tensanpham")%>">
                                            </a>
                                        </div>
                                        <div class="div-detail-product">
                                            <h3>
                                                <a style="text-transform: uppercase;" href='Detail.aspx?ID=<%# Eval("masanpham")%>'>
                                                    <%# Eval("tensanpham")%></a></h3>
                                            <p>
                                                Giá: <span>
                                                    <%# Eval("giasanpham")%>
                                                    đ </span>
                                            </p>
                                            <p>
                                                Giá ĐL: <span style="font-weight: normal"><a href="">Đăng nhập</a></span></p>
                                            <p>
                                                Tình trạng:
                                                <%# tinhtranghang(Eval("soluong"))%>
                                            </p>
                                            <p>
                                                <input class="pquantityx" id="quantity_<%# Eval("masanpham")%>" type="text" size="1"
                                                    value="<%# Eval("soluong")%>">
                                                <a href='Default.aspx?action=add&amp;id=<%# Eval("masanpham")%>&amp;name=<%# Eval("tensanpham")%>&amp;price=<%# Eval("giasanpham")%>'
                                                    class="bt-dathang add2cart" style="vertical-align: middle;" data-id="<%# Eval("masanpham")%>">
                                                    Chọn mua</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:shop_phone %>"
                        SelectCommand="SELECT top 9 [masanpham], [tensanpham], [giasanpham], [phukiendikem], [hinhanh], [soluong] FROM [sanpham] WHERE ([spnoibat] = @spnoibat)">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="true" Name="spnoibat" Type="Boolean" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </ul>
            </div>
        </div>
    </div>
</div>
<div>
    <div class="span9">
        <div id="wproduct-list" class="box-brand">
            <div class="header2">
                <span class="title2"><span><a href="">Sản phẩm mới</a> <a href="" style="float: right;
                    color: #004370; font: normal 11px arial; text-transform: none; margin: 4px -4px;"
                    title="Xem thêm Sản phẩm mới">Xem thêm &gt;</a> </span></span>
            </div>
            <div class="w-product-list clearfix content-product" style="border: 1px solid #e1e1e2;
                border-top: none;">
                <ul class="product-list">
                    <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource3">
                        <ItemTemplate>
                            <li id="main_<%# Eval("masanpham")%>" class="itm">
                                <div>
                                    <div id="productImageWrapID_<%# Eval("masanpham")%>">
                                        <div class="div-image-product">
                                            <a href='Detail.aspx?ID=<%# Eval("masanpham")%>' title="">
                                                <img class="image-product" id="img_<%# Eval("masanpham")%>" src="<%# Eval("hinhanh")%>"
                                                    alt="" title="<%# Eval("tensanpham")%>">
                                                <img class="product-img2" src="Images/khuyenmai.gif" alt="" style="border: none;">
                                            </a>
                                        </div>
                                        <div class="div-detail-product">
                                            <h3>
                                                <a style="text-transform: uppercase;" href='Detail.aspx?ID=<%# Eval("masanpham")%>'>
                                                    <%# Eval("tensanpham")%></a></h3>
                                            <p>
                                                Giá: <span>
                                                    <%# Eval("giasanpham")%>
                                                    đ </span>
                                            </p>
                                            <p>
                                                Giá ĐL: <span style="font-weight: normal"><a href="">Đăng nhập</a></span></p>
                                            <p>
                                                Tình trạng:
                                                <%# tinhtranghang(Eval("soluong"))%>
                                            </p>
                                            <p>
                                                <input class="pquantityx" id="quantity_<%# Eval("masanpham")%>" type="text" size="1"
                                                    value="<%# Eval("soluong")%>">
                                                <a href='Default.aspx?action=add&amp;id=<%# Eval("masanpham")%>&amp;name=<%# Eval("tensanpham")%>&amp;price=<%# Eval("giasanpham")%>'
                                                    class="bt-dathang add2cart" style="vertical-align: middle;" data-id="<%# Eval("masanpham")%>">
                                                    Chọn mua</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:shop_phone %>"
                        SelectCommand="SELECT top 9 [masanpham], [tensanpham], [giasanpham], [phukiendikem], [hinhanh], [soluong] FROM [sanpham] order by [ngaydang]">
                    </asp:SqlDataSource>
                </ul>
            </div>
        </div>
    </div>
</div>
<div>
    <div class="span9">
        <div id="wproduct-list" class="box-brand">
            <div class="header2">
                <span class="title2"><span><a href="">Sản phẩm giảm giá</a> <a href="" style="float: right;
                    color: #004370; font: normal 11px arial; text-transform: none; margin: 4px -4px;"
                    title="Xem thêm Sản phẩm vừa giới thiệu">Xem thêm &gt;</a> </span></span>
            </div>
            <div class="w-product-list clearfix content-product" style="border: 1px solid #e1e1e2;
                border-top: none;">
                <ul class="product-list">
                    <asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource4">
                        <ItemTemplate>
                            <li id="main_<%# Eval("masanpham")%>" class="itm">
                                <div>
                                    <div id="productImageWrapID_<%# Eval("masanpham")%>">
                                        <div class="div-image-product">
                                            <a href='Detail.aspx?ID=<%# Eval("masanpham")%>' title="">
                                                <img class="image-product" id="img_<%# Eval("masanpham")%>" src="<%# Eval("hinhanh")%>"
                                                    alt="" title="<%# Eval("tensanpham")%>">
                                            </a>
                                        </div>
                                        <div class="div-detail-product">
                                            <h3>
                                                <a style="text-transform: uppercase;" href='Detail.aspx?ID=<%# Eval("masanpham")%>'>
                                                    <%# Eval("tensanpham")%></a></h3>
                                            <p>
                                                Giá: <span>
                                                    <%# Eval("giasanpham")%></span>
                                            </p>
                                            <p>
                                                Giá mới: <span>
                                                    <%# Eval("giamoi")%></span>
                                            </p>
                                            <p>
                                                Giá ĐL: <span style="font-weight: normal"><a href="">Đăng nhập</a></span></p>
                                            <p>
                                                Tình trạng:
                                                <%# tinhtranghang(Eval("soluong"))%>
                                            </p>
                                            <p>
                                                <input class="pquantityx" id="quantity_<%# Eval("masanpham")%>" type="text" size="1"
                                                    value="<%# Eval("soluong")%>">
                                                <a href='Default.aspx?action=add&amp;id=<%# Eval("masanpham")%>&amp;name=<%# Eval("tensanpham")%>&amp;price=<%# Eval("giasanpham")%>'
                                                    class="bt-dathang add2cart" style="vertical-align: middle;" data-id="<%# Eval("masanpham")%>">
                                                    Chọn mua</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:shop_phone %>"
                        SelectCommand="SELECT top 6 sanpham.[masanpham], [tensanpham], [giasanpham], [phukiendikem], [hinhanh], [soluong] , giamgia.giamoi FROM [sanpham] inner join giamgia on sanpham.masanpham = giamgia.masanpham where (giamgia.trangthai = @trangthai)  ORDER BY [ngaydang]">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="true" Name="trangthai" Type="Boolean" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </ul>
            </div>
        </div>
    </div>
</div>
